package com.tencent.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tencent.pojo.*;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CourseDao extends BaseMapper<Course> {

    List<Chapter> getId(Course course);

    @Insert("insert into tb_video set video_address=#{videosAddress},video_length=#{videosLength},video_name=#{videosName},video_status=#{videosStates}," +
            "cid=#{cid} ")
    void sava(Videos videos);

    @Select("select * from tb_tager")
    List<Tager> getAllTager();

    @Select("select * from tb_type")
    List<CourseType> getCourseType();

    @Select("select * from tb_type where tid=#{tagerId}")
    List<CourseType> getCourseTypeId(int tagerId);

}
